package com.qianguo.buyer.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.eva.androidlibrary.api.entity.BaseBean;

/**
 * 键值对
 *
 * @author eva
 * @date 16/5/25
 */
public class KeyValuePair extends BaseBean implements Parcelable {

    private String key;
    private String value;

    public KeyValuePair(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.key);
        dest.writeString(this.value);
    }

    protected KeyValuePair(Parcel in) {
        this.key = in.readString();
        this.value = in.readString();
    }

    public static final Creator<KeyValuePair> CREATOR = new Creator<KeyValuePair>() {
        public KeyValuePair createFromParcel(Parcel source) {
            return new KeyValuePair(source);
        }

        public KeyValuePair[] newArray(int size) {
            return new KeyValuePair[size];
        }
    };
}
